package com.dylan.springcloud.clienta.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Dylan on 2018/10/13.
 */
@RestController
public class TestController {

    @GetMapping("/add")
    public String add(Integer a, Integer b, HttpServletRequest request) {
        String result = " From Port: "+ request.getServerPort() + ", Result: " + (a + b);
        System.out.println(result);
        return result;
    }
}
